3.1487 \(\int \sec ^4(c+d x) (a+b \sin (c+d x)) \tan (c+d x) \, dx\)

Optimal. Leaf size=74 \[ \frac {a \sec ^4(c+d x)}{4 d}-\frac {b \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {b \tan (c+d x) \sec ^3(c+d x)}{4 d}-\frac {b \tan (c+d x) \sec (c+d x)}{8 d} \]

[Out]

-1/8*b*arctanh(sin(d*x+c))/d+1/4*a*sec(d*x+c)^4/d-1/8*b*sec(d*x+c)*tan(d*x+c)/d+1/4*b*sec(d*x+c)^3*tan(d*x+c)/
d

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {2834, 2606, 30, 2611, 3768, 3770} \[ \frac {a \sec ^4(c+d x)}{4 d}-\frac {b \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {b \tan (c+d x) \sec ^3(c+d x)}{4 d}-\frac {b \tan (c+d x) \sec (c+d x)}{8 d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^4*(a + b*Sin[c + d*x])*Tan[c + d*x],x]

[Out]

-(b*ArcTanh[Sin[c + d*x]])/(8*d) + (a*Sec[c + d*x]^4)/(4*d) - (b*Sec[c + d*x]*Tan[c + d*x])/(8*d) + (b*Sec[c +
 d*x]^3*Tan[c + d*x])/(4*d)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 2611

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a*Sec[e
+ f*x])^m*(b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] - Dist[(b^2*(n - 1))/(m + n - 1), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 2834

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]),
 x_Symbol] :> Dist[a, Int[Cos[e + f*x]^p*(d*Sin[e + f*x])^n, x], x] + Dist[b/d, Int[Cos[e + f*x]^p*(d*Sin[e +
f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n, p}, x] && IntegerQ[(p - 1)/2] && IntegerQ[n] && ((LtQ[p, 0]
&& NeQ[a^2 - b^2, 0]) || LtQ[0, n, p - 1] || LtQ[p + 1, -n, 2*p + 1])

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \sec ^4(c+d x) (a+b \sin (c+d x)) \tan (c+d x) \, dx &=a \int \sec ^4(c+d x) \tan (c+d x) \, dx+b \int \sec ^3(c+d x) \tan ^2(c+d x) \, dx\\ &=\frac {b \sec ^3(c+d x) \tan (c+d x)}{4 d}-\frac {1}{4} b \int \sec ^3(c+d x) \, dx+\frac {a \operatorname {Subst}\left (\int x^3 \, dx,x,\sec (c+d x)\right )}{d}\\ &=\frac {a \sec ^4(c+d x)}{4 d}-\frac {b \sec (c+d x) \tan (c+d x)}{8 d}+\frac {b \sec ^3(c+d x) \tan (c+d x)}{4 d}-\frac {1}{8} b \int \sec (c+d x) \, dx\\ &=-\frac {b \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a \sec ^4(c+d x)}{4 d}-\frac {b \sec (c+d x) \tan (c+d x)}{8 d}+\frac {b \sec ^3(c+d x) \tan (c+d x)}{4 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 74, normalized size = 1.00 \[ \frac {a \sec ^4(c+d x)}{4 d}-\frac {b \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {b \tan (c+d x) \sec ^3(c+d x)}{4 d}-\frac {b \tan (c+d x) \sec (c+d x)}{8 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^4*(a + b*Sin[c + d*x])*Tan[c + d*x],x]

[Out]

-1/8*(b*ArcTanh[Sin[c + d*x]])/d + (a*Sec[c + d*x]^4)/(4*d) - (b*Sec[c + d*x]*Tan[c + d*x])/(8*d) + (b*Sec[c +
 d*x]^3*Tan[c + d*x])/(4*d)

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 80, normalized size = 1.08 \[ -\frac {b \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - b \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (b \cos \left (d x + c\right )^{2} - 2 \, b\right )} \sin \left (d x + c\right ) - 4 \, a}{16 \, d \cos \left (d x + c\right )^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)*(a+b*sin(d*x+c)),x, algorithm="fricas")

[Out]

-1/16*(b*cos(d*x + c)^4*log(sin(d*x + c) + 1) - b*cos(d*x + c)^4*log(-sin(d*x + c) + 1) + 2*(b*cos(d*x + c)^2
- 2*b)*sin(d*x + c) - 4*a)/(d*cos(d*x + c)^4)

________________________________________________________________________________________

giac [A]  time = 0.23, size = 67, normalized size = 0.91 \[ -\frac {b \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - b \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (b \sin \left (d x + c\right )^{3} + b \sin \left (d x + c\right ) + 2 \, a\right )}}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{16 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)*(a+b*sin(d*x+c)),x, algorithm="giac")

[Out]

-1/16*(b*log(abs(sin(d*x + c) + 1)) - b*log(abs(sin(d*x + c) - 1)) - 2*(b*sin(d*x + c)^3 + b*sin(d*x + c) + 2*
a)/(sin(d*x + c)^2 - 1)^2)/d

________________________________________________________________________________________

maple [A]  time = 0.20, size = 92, normalized size = 1.24 \[ \frac {a}{4 d \cos \left (d x +c \right )^{4}}+\frac {b \left (\sin ^{3}\left (d x +c \right )\right )}{4 d \cos \left (d x +c \right )^{4}}+\frac {b \left (\sin ^{3}\left (d x +c \right )\right )}{8 d \cos \left (d x +c \right )^{2}}+\frac {b \sin \left (d x +c \right )}{8 d}-\frac {b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8 d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^5*sin(d*x+c)*(a+b*sin(d*x+c)),x)

[Out]

1/4/d*a/cos(d*x+c)^4+1/4/d*b*sin(d*x+c)^3/cos(d*x+c)^4+1/8/d*b*sin(d*x+c)^3/cos(d*x+c)^2+1/8*b*sin(d*x+c)/d-1/
8/d*b*ln(sec(d*x+c)+tan(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 75, normalized size = 1.01 \[ -\frac {b \log \left (\sin \left (d x + c\right ) + 1\right ) - b \log \left (\sin \left (d x + c\right ) - 1\right ) - \frac {2 \, {\left (b \sin \left (d x + c\right )^{3} + b \sin \left (d x + c\right ) + 2 \, a\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1}}{16 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)*(a+b*sin(d*x+c)),x, algorithm="maxima")

[Out]

-1/16*(b*log(sin(d*x + c) + 1) - b*log(sin(d*x + c) - 1) - 2*(b*sin(d*x + c)^3 + b*sin(d*x + c) + 2*a)/(sin(d*
x + c)^4 - 2*sin(d*x + c)^2 + 1))/d

________________________________________________________________________________________

mupad [B]  time = 18.54, size = 158, normalized size = 2.14 \[ \frac {\frac {b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\frac {7\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}+\frac {7\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{4}+2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}-\frac {b\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((sin(c + d*x)*(a + b*sin(c + d*x)))/cos(c + d*x)^5,x)

[Out]

((b*tan(c/2 + (d*x)/2))/4 + 2*a*tan(c/2 + (d*x)/2)^2 + 2*a*tan(c/2 + (d*x)/2)^6 + (7*b*tan(c/2 + (d*x)/2)^3)/4
 + (7*b*tan(c/2 + (d*x)/2)^5)/4 + (b*tan(c/2 + (d*x)/2)^7)/4)/(d*(6*tan(c/2 + (d*x)/2)^4 - 4*tan(c/2 + (d*x)/2
)^2 - 4*tan(c/2 + (d*x)/2)^6 + tan(c/2 + (d*x)/2)^8 + 1)) - (b*atanh(tan(c/2 + (d*x)/2)))/(4*d)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**5*sin(d*x+c)*(a+b*sin(d*x+c)),x)

[Out]

Timed out

________________________________________________________________________________________